import request from '@/utils/request'

// 查询知识点列表 name  subjectId 学科Id gradeId 年级Id

export function pageQueryKnowledgePoint(data, pageNum = 1, pageSize = 10) {
  return request({
    url: `/knowledge/point/pageQueryKnowledgePoint?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: 'post',
    data
  })
}

// 删除知识点
export function delKnowledgePoint(ids = []) {
  return request({
    url: '/knowledge/point/deleteByIds',
    method: 'post',
    data: { ids: ids }
  })
}


// 新增/修改知识点
export function addOrUpdateKnowledgePoint(data) {
  return request({
    url: '/knowledge/point/addOrUpdateKnowledgePoint',
    method: 'post',
    data: data
  })
}

// 获取知识点详情--- 根据id 单个查询
export function getKnowledgePointById(id) {
  return request({
    url: '/knowledge/point/queryKnowledgeById?id=' + id,
    method: 'get'
  })
}


// 关联知识点
export function selectAssociateKnowledge(data) {
  return request({
    url: '/knowledge/point/selectAssociateKnowledge',
    method: 'post',
    data: data
  })
}

export const subjects = [
  {
    id: 1,
    name: '数学'
  }
];

export const grades = [
  {
    id: 1,
    name: '初一'
  },
  {
    id: 2,
    name: '初二'
  },
  {
    id: 3,
    name: '初三'
  }
];



